import java.awt.event.*;
import javax.swing.*;
import net.miginfocom.swing.*;
/*
 * Created by JFormDesigner on Mon Dec 23 11:39:53 GMT+08:00 2024
 */



/**
 * @author 22387
 */
public class AddNewBook extends JFrame {
    public AddNewBook() {
        initComponents();
    }

    private void button1MouseClicked(MouseEvent e) {


        String url = "jdbc:mysql://localhost:3306/javaproject";
        String username = "root";
        String rootPassword = "root"; // 注意：不要在生产环境中使用硬编码的密码


    }

    private void initComponents() {
        // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents  @formatter:off
        label1 = new JLabel();
        label2 = new JLabel();
        textField6 = new JTextField();
        label3 = new JLabel();
        textField2 = new JTextField();
        label4 = new JLabel();
        textField3 = new JTextField();
        label5 = new JLabel();
        textField4 = new JTextField();
        label6 = new JLabel();
        textField5 = new JTextField();
        button1 = new JButton();

        //======== this ========
        var contentPane = getContentPane();
        contentPane.setLayout(new MigLayout(
            "hidemode 3",
            // columns
            "[fill]" +
            "[fill]" +
            "[fill]" +
            "[fill]" +
            "[fill]" +
            "[fill]" +
            "[fill]" +
            "[fill]" +
            "[fill]" +
            "[fill]" +
            "[fill]" +
            "[fill]" +
            "[fill]" +
            "[fill]" +
            "[fill]" +
            "[fill]" +
            "[fill]",
            // rows
            "[]" +
            "[]" +
            "[]" +
            "[]" +
            "[]" +
            "[]" +
            "[]" +
            "[]" +
            "[]" +
            "[]" +
            "[]" +
            "[]"));

        //---- label1 ----
        label1.setText("\u6dfb\u52a0\u65b0\u56fe\u4e66");
        label1.setFont(label1.getFont().deriveFont(label1.getFont().getSize() + 5f));
        contentPane.add(label1, "cell 3 1");

        //---- label2 ----
        label2.setText("\u4e66\u540d\uff1a");
        contentPane.add(label2, "cell 1 3");
        contentPane.add(textField6, "cell 2 3 7 1");

        //---- label3 ----
        label3.setText("\u4f5c\u8005\uff1a");
        contentPane.add(label3, "cell 1 4");
        contentPane.add(textField2, "cell 2 4 7 1");

        //---- label4 ----
        label4.setText("\u5165\u5e93\u65f6\u95f4\uff1a");
        contentPane.add(label4, "cell 1 5");
        contentPane.add(textField3, "cell 2 5 7 1");

        //---- label5 ----
        label5.setText("\u5728\u5e93\u6570\u91cf\uff1a");
        contentPane.add(label5, "cell 1 6");
        contentPane.add(textField4, "cell 2 6 7 1");

        //---- label6 ----
        label6.setText("\u5728\u5e93\u4f4d\u7f6e\uff1a");
        contentPane.add(label6, "cell 1 8");
        contentPane.add(textField5, "cell 2 8 7 1");

        //---- button1 ----
        button1.setText("\u786e\u5b9a");
        button1.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent e) {
                button1MouseClicked(e);
            }
        });
        contentPane.add(button1, "cell 3 10");
        pack();
        setLocationRelativeTo(getOwner());
        // JFormDesigner - End of component initialization  //GEN-END:initComponents  @formatter:on
    }

    // JFormDesigner - Variables declaration - DO NOT MODIFY  //GEN-BEGIN:variables  @formatter:off
    private JLabel label1;
    private JLabel label2;
    private JTextField textField6;
    private JLabel label3;
    private JTextField textField2;
    private JLabel label4;
    private JTextField textField3;
    private JLabel label5;
    private JTextField textField4;
    private JLabel label6;
    private JTextField textField5;
    private JButton button1;
    // JFormDesigner - End of variables declaration  //GEN-END:variables  @formatter:on
}
